<%@ page contentType="text/html; charset=euc-kr" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<fmt:requestEncoding value="euc-kr"/>
<fmt:setLocale value="kr_KR" scope="session"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>CustUser Lists</title>
<script type="text/javascript">
function deletechecks(e){
	var x=document.getElementsByName("delck");
	var lng=x.length;
	for(i=0;i<lng;++i){
		x(i).checked=e;		
	}
}
</script>
</head>
<sql:setDataSource var="oracleDS" 
 url="jdbc:oracle:thin:@127.0.0.1:1521:XE"
 user="hr" password="hr"/>
<sql:query var="custuser" dataSource="${oracleDS}">
SELECT XMLElement("custlists",
        XMLAgg(
       	   XMLElement("custlist",
                        XMLElement("id",id),
       			XMLElement("name",name),
       			XMLElement("address",address)
           )        		
         )  
      )  results
FROM CUSTUSER  
</sql:query>

<c:set var="custxml">
<?xml version="1.0" encoding="euc-kr"?>

</c:set>
<body>
<c:forEach var='cust' items='${custuser.rows}' varStatus="status">
<c:out value=" ${cust.results}"/>
</c:forEach>

</body>
</html>

      